package com.zhangdi.demo.jdbc.entity;

import java.util.List;

public class Area {
    private Integer id;
    private String code;
    private String name;
    private Integer lft;
    private Integer rgt;
    private Integer pid;
    private Integer oid;
    private Integer levelinfo;

    private List<Area> children;

    private int childrencount;

    public int getChildrencount() {
        return childrencount;
    }

    public void setChildrencount(int childrencount) {
        this.childrencount = childrencount;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLft() {
        return lft;
    }

    public void setLft(Integer lft) {
        this.lft = lft;
    }

    public Integer getRgt() {
        return rgt;
    }

    public void setRgt(Integer rgt) {
        this.rgt = rgt;
    }

    public Integer getPid() {
        if(pid == null){
            return 0;
        }
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public Integer getLevelinfo() {
        return levelinfo;
    }

    public void setLevelinfo(Integer levelinfo) {
        this.levelinfo = levelinfo;
    }

    public List<Area> getChildren() {
        return children;
    }

    public void setChildren(List<Area> children) {
        this.children = children;
    }
}
